import request from '@/utils/request'
//获取分销商品-我的供货列表
export function distributionList(params) {
  return request({
    url: '/cloudApi/marketing/distGoods/getDistributionGoodsList',
    method: 'get',
    params
  })
}

//供应商审核列表
export function distributionSupplierAudit(params) {
    return request({
      url: '/cloudApi/merchant/merchant/getSupplierAuditList',
      method: 'get',
      params
    })
}
//删除分销商品
export function deleteDistribution(data) {
  return request({
    url: '/cloudApi/marketing/distGoods/deleteDistributionGoodsById',
    method: 'POST',
    data
  })
}
//批量删除分销商品
export function BatchDeleteDistribution(data) {
  return request({
    url: '/cloudApi/marketing/distGoods/deleteByIdBatch',
    method: 'POST',
    data
  })
}
//设置分销分销比例
export function saveGoodsSetting(data) {
  return request({
    url: '/cloudApi/marketing/distGoods/saveDistributionGoods',
    method: 'POST',
    data
  })
}
//批量设置分销分销比例
export function batchSet(data) {
  return request({
    url: '/cloudApi/marketing/distGoods/saveGoodsSettingBatch',
    method: 'POST',
    data
  })
}
//一键分销---添加商户商品渠道
export function keyDistribution(data) {
  return request({
    url: '/cloudApi/goods/merchantGoods/saveMerchantGoods',
    method: 'POST',
    data
  })
}

// 他营商品
export function HeCampGoods(params) {
  return request({
    url: '/cloudApi/goods/merchantGoods/getMgGoodsList',
    method: 'get',
    params
  })
}
//分销供应商提交资质
export function qualifications(params) {
  return request({
    url: '/cloudApi/merchant/merchant/getByUserId',
    method: 'get',
    params
  })
}

//添加分销供应商审核列表
export function addList(data) {
  return request({
    url: '/cloudApi/marketing/distributionSupplierAudit/saveDistributionSupplierAudit',
    method: 'post',
    data
  })
}

//修改商户
export function merchantss(data) {
  return request({
    url: '/cloudApi/merchant/merchant/updateMerchant',
    method: 'post',
    data
  })
}

//判断是否已经成为供应商
export function isSupplier(params) {
  return request({
    url: '/cloudApi/merchant/merchant/isSupplier',
    method: 'get',
    params
  })
}

//修改分销供应商审核状态
export function ReviewTheStatus(data) {
  return request({
    url: '/cloudApi/merchant/merchant/supplierAudit',
    method: 'post',
    data
  })
}

//添加或修改分销供应商
export function addSupplier(data) {
  return request({
    url: '/cloudApi/marketing/distributionSupplier/saveDistributionSupplier',
    method: 'post',
    data
  })
}
//商户商品渠道批量上下架----他营里的上下架
export function saveStoreGoods(data) {
  return request({
    url: '/cloudApi/goods/merchantGoods/shelvesBatchMerchantGoods',
    method: 'post',
    data
  })
}

//获取商户渠道列表
export function getMerchantChannelList(params) {
  return request({
    url: '/cloudApi/merchant/merchantChannel/getMerchantChannelList',
    method: 'get',
    params
  })
}
//修改是否分销的状态
export function setDistributionStaus(data) {
  return request({
    url: '/cloudApi/goods/goods/distribution',
    method: 'post',
    data
  })
}
//批量修改是否分销的状态
export function setDistributionBatchStaus(data) {
  return request({
    url: '/cloudApi/goods/goods/distributionBatch',
    method: 'post',
    data
  })
}

//自营里的分销-是否分销分销商品
export function isUpdateDistribution(data) {
  return request({
    url: '/cloudApi/marketing/distGoods/updateDistribution',
    method: 'post',
    data
  })
}
//他营里的删除-清除商户商品渠道
export function removeMerchantGoods(data) {
  return request({
    url: '/cloudApi/goods/merchantGoods/removeMerchantGoods',
    method: 'post',
    data
  })
}